/*
 * aln.h
 *
 *  Created on: Oct 25, 2013
 *      Author: jiang
 */

#ifndef ALN_H_
#define ALN_H_


#include "util.h"
#include "lookup.h"
#include "seqio.h"
#include "stdaln.h"


typedef struct
{
	int allowMismatch;
	int mismatchScore;
	AlnParam AP; //for local alignment
}alnParam;  //for the whole alignment process


typedef struct{
		uint64_t shift;
		uint64_t position;
}pos_shift;
#define passToNext 1

typedef struct
{
	uint64_t pos;
	pair  region;
}posMatchedRegion_t;


typedef struct
{
	FILE *bwaReadsFile, *noDkmerReadsFile, *lowScoreReadsFile,*postProcessFile;
}misReadsFiles;
#ifdef __cplusplus
extern "C" {
#endif
 	 	int dmap_map(const  char *refFile, const char *readsFile,opt_t *op);
 	 	int dmap_map_core(bntseq_t *bns,table_t *kmer_position_table, uint8_t *kmerStrandIndicator, const int64_t l_pac,const uint8_t *pac,
 	 	read_t *readsChunk, uint32_t n_seqs, opt_t *op, misReadsFiles otherReadsFiles);
 	 	int writeSAM();
#ifdef __cplusplus
}
#endif
#endif /* ALN_H_ */
